<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width">
    <meta name="format-detection" content="telephone=yes"/>
    <title>报销编辑</title>
    <link rel="stylesheet" href="../../css/reset.css">
    <link rel="stylesheet" href="../../css/base.css">
    <link rel="stylesheet" href="../../css/reimbursement.css">
    <style>
         iframe{margin-top: 50px;}
        .business-foot input{background-color:inherit;color:#ffffff;font-size:1.1em;}
        .heard{position: fixed;top: 0;}
        .business-foot{position: fixed;bottom: 0;}
    </style>
</head>
<body style="background-color: #ffffff">
<div class="wrapper">
    <!--<div class="heard">-->
        <!--<ul class="other b-btm">-->
            <!--<li class="business11"><span class="select-sp">业务招待</span></li>-->
            <!--<li class="traffic11"><span>交通</span></li>-->
            <!--<li class="travel11"><span>差旅</span></li>-->
            <!--<li class="communication11"><span>通讯</span></li>-->
            <!--<li class="low"><span>低值易耗品</span></li>-->
            <!--<li class="other11"><span>其他</span></li>-->
        <!--</ul>-->
    <!--</div>-->
    <iframe class="travel12" src="../Reimbursement/re-business.html" allowFullScreen=true width="100%" height="550" >
    </iframe>
    <!--<footer class="business-foot form-actions">-->
        <!--<input  type="submit" name="submit" id="submit" value="保存" >-->
    <!--</footer>-->
</div>
<script src="../../js/jquery-2.1.4.min.js"></script>
<script src="../../js/base.js"></script>
<script src="../../js/data.js"></script>
<script src="//code.jquery.com/jquery-latest.js"></script>
<script src="../../js/reimbursement.js"></script>
<script>
$('.traffic11').click(function(){
$('.travel12').src='../Reimbursement/re-travel.html';
});
    function pushHistory() {
        var state = {
            title: "报销编辑",
            url: "../Reimbursement/re-business.html"
        };
        window.history.pushState(state, "报销编辑", "../Reimbursement/re-business.html");
    }
    $(function(){
        pushHistory();
        var bool=false;
        setTimeout(function(){
            bool=true;
        },1500);
        window.addEventListener("popstate", function(e) {
            if(bool)
            {
                $('.background').show();
            }
            pushHistory();

        }, false);
    });
    $('.cancel,.sub-sp1').click(function(){
        $('.background').hide();
    });

    $(document).ready(function () {
        if (localStorage){

            if (localStorage.timers) {
                $("#timers").val(localStorage.timers);
            }
            if (localStorage.money) {
                $("#money").val(localStorage.money);
            }
            if (localStorage.Venue) {
                $("#Venue").val(localStorage.Venue);
            }
            if (localStorage.Company) {
                $("#Company").val(localStorage.Company);
            }
            if (localStorage.number) {
                $("#number").val(localStorage.number);
            }
            if (localStorage.Remarks) {
                $("#txt1").val(localStorage.Remarks);
            }
            var Venue=storage.getItem("Venue");
            console.log(Venue);
            var money=storage.getItem("money");
            console.log(money);
            var Company=storage.getItem("Company");
            console.log(Company);
            var number=storage.getItem("number");
            console.log(number);
            var Remarks=storage.getItem("Remarks");
            console.log(Remarks);

            /*
            * 当表单中的值改变时,localstorage的值也改变
            */
            $("input[type=text],select,textarea").change(function(){
                $this = $(this);
                localStorage[$this.attr("name")] = $this.val();
            });
            $("form");
            /*
            * 如果表单提交，则调用clear方法
            */
            $('#submit') .click(function(key,value){
                localStorage.setItem(key);
            })
                .change(function(){
                    console.log(localStorage);
                });
        }
    });

    var calendar = new datePicker();
    calendar.init({
        'trigger': '#demo1', /*按钮选择器，用于触发弹出插件*/
        'type': 'date',/*模式：date日期；datetime日期时间；time时间；ym年月；*/
        'minDate':'1900-1-1',/*最小日期*/
        'maxDate':'2100-12-31',/*最大日期*/
        'onSubmit':function(){/*确认时触发事件*/
            var theSelectData=calendar.value;
        },
        'onClose':function(){/*取消时触发事件*/
        }
    });
</script>
</body>
</html>